package util;

import org.junit.Test;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

/**
 * @Author khaiLoon
 * @date 2018/9/6
 **/
public class Collections_ {

    @Test
    public void t1() {
        ArrayList<Integer> list = new ArrayList<>(Arrays.asList(0,1,2,3,4,5,6,7,8,9));
        int search = Collections.binarySearch(list, 5);
        System.out.println(search);
    }
}
